DoVerb Method (OLEObject Object)

       

Opens an object for an operation, such as editing.

Syntax

object.DoVerb (verb)

The DoVerb method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
verb Optional. The verb to execute of the OLEObject object within RichTextBox control. If not specified, the default verb is executed. The value of this argument can be one of the standard verbs supported by all objects or an index of the ObjectVerbs property array.

Remarks

The DoVerb method executes a verb of the specified OLEObject object. The verb argument is an index of one of the verbs listed in the ObjectVerbs property array or one of the standard verbs listed below.

Each object can support its own set of verbs. The following values represent standard verbs every object should support:

Constant Value Description
vbOLEPrimary 0 The default action for the object.
vbOLEShow -1 Activates the object for editing. If the application that created the object supports in-place activation, the object is activated within the RichTextBox control.
vbOLEOpen -2 Opens the object in a separate application window. If the application that created the object supports in-place activation, the object is activated in its own window.
vbOLEHide -3 For embedded objects, hides the application that created the object.
vbOLEUIActivate -4 If the object supports in-place activation, activates the object for in-place activation and shows any user interface tools. If the object doesn't support in-place activation, the object doesn't activate, and an error occurs.
vbOLEInPlaceActivate -5 If the user moves the focus to the embedded object, creates a window for the object and prepares the object to be edited. An error occurs if the object doesn't support activation on a single mouse click.
vbOLEDiscardUndoState -6 Used when the object is activated for editing to discard all record of changes that the object's application can undo.

Note   These verbs may not be listed in the ObjectVerbs property array.